#!/usr/bin/python3

list1 = ["Qingdao", "China", 2020, 1949]
list2 = [1, 2, 3, 4, 5]

print("list1[0]: %s"%(list1[0]))
print("list2[1:5]:",list2[1:5])


list1[2] = 2021
print(list1)
print("删除list1[2]")

del list1[2]
print(list1)

print("list1的长度为%d"%(len(list2)))

print("list2:",list2)
if 3 in list2:
    print("3在列表list1中")
else:
    print("3不在列表list1中")

for i in list2:print(i, end = "\t")

print()


print("list2中最大值为%d"%(max(list2)))
print("list2中最小值为%d"%(min(list2)))
print("list2的长度是%d个元素"%(len(list2)))

print("list2末尾添加元素6与7")
list2.append(6)
list2.append(7)
print(list2)

list3 = [8, 9, 10]
print("list3：",list3)
print("将list3添加到list2中")
list2.extend(list3)
print(list2)

print("5在list2中的索引位置为：",list2.index(5))

print("在索引4位置插入元素5.5")
list2.insert(4,5.5)
print(list2)

print("移除list2中索引值为4的元素")
print("移除的值为",list2.pop(4))
print("移除后的值为：\n",list2)
